export interface IKnowledgeBase {
  kbId: string;
  name: string;
  description: string;
  createBy: string;
  embedModelId: string;
  fileCount: number | null;
  chunkCount: number | null;
  characterCount: number | null;
  applicationCount: number | null;
  createTime: string;
  updateTime: string;
}

export interface IKnowledgeBaseEditParams {
  kbId: string;
  name: string;
  embedModelId: string;
  description: string;
  type?: string;
}

export interface IHitTestingParams {
  searchMode: string;
  keyword: string;
  topK: number;
  kbIds?: string;
  chunkType?: string;
  similarityThreshold: number;
  appId?: string;
}

export interface IHitTesting {
  chunkId: string;
  content: string;
  docName: string;
  fileId: string;
  kbId: string;
  score: number;
  title: string;
}

export interface IRelatedIssues {
  createBy?: string;
  createTime?: string;
  questionId: string;
  questionName: string;
  updateBy?: string;
  updateTime?: string;
}

export interface IQuestionAssociateParams {
  chunkId: string;
  questionInfoAOs: any[];
  chunkText: string;
  title: string;
  fileId: string;
  kbId: string;
}

export interface IKbfileQueryParams {
  kbId?: string;
  fileStatus?: number | '' | null; //0失败，1成功，2进行中
  pageNum?: number;
  pageSize?: number;
}

export interface IKbfileAddParam {
  fileDetailId: string;
  kbId: string;
  fileOriginName: string;
  enableStatus: 1;
  fileStatus: 2;
}

export interface IKbfileQuery {
  characterCount: number;
  chunkCount: number;
  createTime: string;
  enableStatus: string;
  fileId: string;
  fileOriginName: string;
  fileStatus: number;
  updateTime: string;
}

export interface IChunkQueryParam {
  kbId: string;
  fileId: string;
  status: number | null;
  content: string;
}

export interface IChunkQuery {
  title: string;
  content: string;
  chunkId: string;
  status: number;
  fileId: string;
  fileDetailId: string;
  kbId: string;
  relatedQuestionCount: number;
}

export interface IQueryChunkVO {
  chunkId: string;
  content: string;
  title: string;
  isRelated: boolean;
}

export interface IQuestionAfter {
  fileId: string;
  fileName: string;
  queryChunkVOs: IQueryChunkVO[];
}

export interface IChunkVO {
  title: string;
  content: string;
  chunkId: string;
  status: number;
  fileId: string;
  kbId: string;
  fileName: string;
  relatedQuestionCount: number | null;
}

export interface IQuestion {
  questionId: string;
  questionName: string;
  kbId: string;
  chunkCount: number;
  chunkVOs: IChunkVO[];
  createTime: string;
  createBy: string;
  updateTime: string;
  updateBy: string;
}
